package com.pm.controller.file;

import com.pm.common.Response;
import com.pm.common.annotation.UserLoginToken;
import com.pm.common.exception.ExpCodeState;
import com.pm.entity.po.file.FileLibType;
import com.pm.service.file.FileLibTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "附件类型管理")
@UserLoginToken
@RestController
@RequestMapping("/fileLibTypeController")
public class FileLibTypeController {
    @Autowired
    FileLibTypeService fileLibTypeService;

    @ApiOperation("查询类型文件")
    @PostMapping("/getList")
    @ResponseBody
    public Response<List<FileLibType>> getList(FileLibType fileLibType) {
        List<FileLibType> result = fileLibTypeService.getList(fileLibType);
        Response<List<FileLibType>> res = new Response<List<FileLibType>>(ExpCodeState.query_data_success, result);
        return res;
    }
}
